<?
error_reporting(0);
	session_start();//gọi một phiên làm việc
	require_once("model/lang_vn.php");
	$m = array();//định nghĩa các mức menu
	$m[0] = isset($_REQUEST['cc'])? $_REQUEST['cc'] : null;
	$m[1] = isset($_REQUEST['m1'])? $_REQUEST['m1'] : null;
	$m[2] = isset($_REQUEST['m2'])? $_REQUEST['m2'] : null;
	$m[3] = isset($_REQUEST['m3'])? $_REQUEST['m3'] : null;	
	$m[4] = isset($_REQUEST['m4'])? $_REQUEST['m4'] : null;	
	if($_SESSION['hd308']==""){
		$session = date("dHis");
		$_SESSION['hd308'] = $session;
	}
	
	// nếu menu nhiều mức thì thêm vào m[n]

	require PATH."model/config.php";
	require PATH."model/sql.class.php";
	require PATH."view/pub.class.php";	
	$sql=new sql();
	$pub=new pub();
	$sql->CONNECT_DB(HOST,USER,PASS,DB);
	$tg=time();
	$tgout=900;
	$tgnew=$tg - $tgout;
	$uo_ip = $_SERVER['REMOTE_ADDR'];
	$uo_local = $_SERVER['PHP_SELF'];
	$pub->visiter();	
	$resultdel = $_SESSION['hd308']-10000000;
	$mresult = mysql_query("DELETE FROM movie_tpm WHERE tpm_session<=".$resultdel."");
	$query=mysql_query("insert into useronline(tgtmp,date,ip,local) values(".$tg.",'".date("Y-m-d")."','".$uo_ip."','".$uo_local."')");
	
?>	

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>phim hd, chep phim hd, chep phim, chép phim, copy phim, phim, hd, o cung, xem phim hd, down phim hd, list phim, phim tam ly, phim, dau phat 3d, dau phat hd, dau phat 3d tot nhat, dau phat hd tot nhat</title>


<link href="<?=PATH_HTTP?>images/logoweb.ico" rel="icon">
<!--link rel="stylesheet" type="text/css" href="< ?=PATH_HTTP?>css/stylesheet.css"-->
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/style.css">
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/livesearch.css">
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/nivo-slider.css">
 <link rel="stylesheet" media="all" type="text/css" href="<?=PATH_HTTP?>css/popupcategory.css">
 <link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/thickbox.css">
 <link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/lightbox.css">
 <script type="text/javascript" src="<?=PATH_HTTP?>js/query.js"></script>
<script type="text/javascript" src="<?=PATH_HTTP?>js/mtooltip.js"></script>
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/tooltip.css" />

<!--[if IE]>
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/ie6.css" />
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>css/iecss.css" />
<![endif]-->
<script type="text/javascript" src="<?=PATH_HTTP?>js/script.js"></script>
<script type="text/javascript" src="<?=PATH_HTTP?>js/js.js"></script>
<script type="text/javascript" src="js/jquery-ui-1.7.2.custom.min.js"></script>
<script type="text/javascript" src="<?=PATH_HTTP?>js/jquery.js"></script>
<script type="text/javascript" src="<?=PATH_HTTP?>js/boxover.js"></script>	
<script type="text/javascript" src="<?=PATH_HTTP?>js/jquery-1.3.2.min.js"></script>
<script type="text/javascript" src="<?=PATH_HTTP?>js/thickbox-compressed.js"></script>

<script type="text/javascript" src="<?=PATH_HTTP?>js/tab.js"></script>
<script type="text/javascript" src="<?=PATH_HTTP?>js/Common.js"></script>
                   

<SCRIPT LANGUAGE="JavaScript">

	<!-- Hide
	function killErrors() {
	return true;
	}
	window.onerror = killErrors;
	// -->
	</SCRIPT>
	
	<script type="text/javascript" src="<?=PATH_HTTP?>highslide/highslide-with-gallery.js"></script>
<link rel="stylesheet" type="text/css" href="<?=PATH_HTTP?>highslide/highslide.css" />
<script type="text/javascript">
	hs.graphicsDir = '<?=PATH_HTTP?>highslide/graphics/';
	hs.align = 'center';
	hs.transitions = ['expand', 'crossfade'];
	hs.outlineType = 'rounded-white';
	hs.fadeInOut = true;
	hs.numberPosition = 'caption';
	hs.dimmingOpacity = 0.75;
	
	// Add the controlbar
	if (hs.addSlideshow) hs.addSlideshow({
		//slideshowGroup: 'group1',
		interval: 5000,
		repeat: false,
		useControls: true,
		fixedControls: 'fit',
		overlayOptions: {
			opacity: .75,
			position: 'bottom center',
			hideOnMouseOut: true
		}
	});
</script>
</head>
<body onload="initialize()" onunload="GUnload()">
<?
		
		require PATH."templates/header.html";	//gọi file header.html
					$file = isset($m[0]) ? $m[0] : 'default';// nếu m[0]="" thì hiển thị trang default ngược lại thì hiển thị trang khác.
					require PATH."controllers/".$file.".php";// gọi file trong thư mục controller
					require PATH."templates/".$file.".html";//gọi file trong thư mục templates
            
		
			require PATH."templates/footer.html";	


?>